#include <iostream>
#include <cstdio>
#include <cstring>
#include <cmath>
using namespace std;
const int MAXN=1e6+7;
double a[MAXN];
inline void Read(double &a) {
	char p=getchar();
	while (!isdigit(p)) p=getchar();
	a=0;
	while (isdigit(p)) a=a*10+p-'0', p=getchar();
	if (p!='.') return;
	double f=0;
	p=getchar();
	int cnt=0;
	while (isdigit(p)) f=f*10+p-'0', p=getchar(), ++cnt;
	while (cnt--) f=f/10;
	a=a+f;
}
int main() {
	double _init;
	Read(_init);
	int n;
	scanf("%d", &n);
	double mi=1e11;
	double ans=0;
	for (int i=0; i<n; ++i) {
		Read(a[i]);
		if (a[i]>ans*mi) ans=a[i]/mi;
		if (a[i]<mi) mi=a[i];
	}
	ans=_init*ans-_init;
	printf("%0.2lf\n", ans);
	return 0;
}
